package io.renren.modules.aic.service.impl;

import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;
import io.renren.modules.aic.dao.BalanceDetailDao;
import io.renren.modules.aic.entity.BalanceDetailEntity;
import io.renren.modules.aic.service.BalanceDetailService;

import java.util.Map;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;


@Service("balanceDetailService")
public class BalanceDetailServiceImpl extends ServiceImpl<BalanceDetailDao, BalanceDetailEntity> implements BalanceDetailService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
		String memberId = (String) params.get("memberId");
        Page<BalanceDetailEntity> page = this.selectPage(
                new Query<BalanceDetailEntity>(params).getPage(),
                new EntityWrapper<BalanceDetailEntity>().eq("member_id", memberId)
        );

        return new PageUtils(page);
    }

}
